var FMFPdxfParserEntititiesSolid = Class.create();
FMFPdxfParserEntititiesSolid.prototype = {
    initialize: function () {
        this.helpers = new FMFPParseHelpers();
    },

    ForEntityName: 'SOLID',

    parseEntity: function (scanner, currentGroup) {
        var self = this;
        var entity;
        entity = { type: currentGroup.value };
        entity.points = [];
        currentGroup = scanner.next();
        while (currentGroup !== 'EOF') {
            if (currentGroup.code === 0) break;

            switch (currentGroup.code) {
                case 10:
                    entity.points[0] = self.helpers.parsePoint(scanner);
                    break;
                case 11:
                    entity.points[1] = self.helpers.parsePoint(scanner);
                    break;
                case 12:
                    entity.points[2] = self.helpers.parsePoint(scanner);
                    break;
                case 13:
                    entity.points[3] = self.helpers.parsePoint(scanner);
                    break;
                case 210:
                    entity.extrusionDirection = entity.extrusionDirection || {};
                    entity.extrusionDirection.x = curr.value;
                    break;
                case 220:
                    entity.extrusionDirection = entity.extrusionDirection || {};
                    entity.extrusionDirection.y = curr.value;
                    break;
                case 230:
                    entity.extrusionDirection = entity.extrusionDirection || {};
                    entity.extrusionDirection.z = curr.value;
                    break;
                default: // check common entity attributes
                    self.helpers.checkCommonEntityProperties(entity, currentGroup);
                    break;
            }
            currentGroup = scanner.next();
        }
        return entity;
    },

    type: 'FMFPdxfParserEntititiesSolid'
};